﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CallCategoryMain.aspx.cs" Inherits="Pages_CallCategoryMain"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="gdvCallCategory" runat="server" AutoGenerateColumns="False" 
            DataSourceID="odsCallCategory" DataKeyNames="Id" 
            onrowcommand="gdvCallCategory_RowCommand">
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                    Visible="False" />
                <asp:BoundField DataField="Description" HeaderText="Descrição" 
                    SortExpression="Description" />
                <asp:BoundField DataField="MinimumTimeAnalize" 
                    HeaderText="Tempo mínimo de Análise" SortExpression="MinimumTimeAnalize" />
                <asp:BoundField DataField="MaximumTimeAnalize" 
                    HeaderText="Tempo máximo de análise" SortExpression="MaximumTimeAnalize" />
                <asp:BoundField DataField="MinimumTimeTreatment" 
                    HeaderText="Tempo mínimo de atendimento" 
                    SortExpression="MinimumTimeTreatment" />
                <asp:BoundField DataField="MaximumTimeTreatment" 
                    HeaderText="Tempo máximo de atendimento" 
                    SortExpression="MaximumTimeTreatment" />

                    <asp:TemplateField> 
                    <ItemTemplate>
                        <asp:LinkButton runat= "server"  ID="lbDelete" CommandArgument='<%# Bind("ID") %>' CommandName="Exclude" OnClientClick='javascript:return confirm("Confirma a exclusão deste estado ?")' > Excluir </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField> 
                    <ItemTemplate>
                        <asp:LinkButton runat= "server"  ID="lbUpdate" CommandArgument='<%# Bind("ID") %>' CommandName="Update" > Corrigir </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsCallCategory" runat="server" 
            SelectMethod="GetCallCategories" 
            TypeName="br.com.SistemaChamados.Controller.CallCategoryController">
        </asp:ObjectDataSource>
        <br />
        <br />
        <asp:HyperLink ID="hlCallCategory" runat="server" 
            NavigateUrl="CallCategoryInsert.aspx">Cadastrar</asp:HyperLink>
&nbsp;&nbsp;
        <asp:HyperLink ID="hlMain" runat="server">MenuPrincipal</asp:HyperLink>
    
    </div>
    </form>
</body>
</html>
